package com.skivingcloud.webflux.demo.service.impl;

import com.skivingcloud.webflux.demo.service.DemoService;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;

@Service
public class DemoServiceImpl implements DemoService {
    @Override
    public String getOneResult(String methodName) {
        return String.format("%s invoker success", methodName);
    }

    @Override
    public List<String> getMultiResult(String methodName) {
        List<String> list = new ArrayList<>(3);
        for (int i = 0; i < 3; i++) {
            list.add(String.format("%s invoker success， %d ", methodName, i + 1));
        }
        return list;
    }
}
